from core.inc import *


def Map(request):
  home_t = loader.get_template('map.html')
  hist = HistoryHelper.GetHistory(None,None,None,10)
  c = Context({'REQUEST':request.REQUEST,'CSS_ROOT':'default','HIST':hist,'SESSION':request.session})
  return HttpResponse(home_t.render(c))

def Search(request):
  home_t = loader.get_template('search.html')
  c = Context({'REQUEST':request.REQUEST,'CSS_ROOT':'default','SESSION':request.session})
  return HttpResponse(home_t.render(c))

def Editor(request,sname):
  now = datetime.now()
  tstamp = now.strftime("%Y-%m-%d-%H-%M-%S")
  editor_t = loader.get_template('_editor.html')
  c = Context({'REQUEST':request.REQUEST,'CSS_ROOT':'default','TIME_STAMP':tstamp})
  return HttpResponse(editor_t.render(c))
